@VERSION = 0.029_msgbox display Pixels%Message box wrapper for MESSAGEBOX().Class1& dialogs.hJ# ..\foxpro.h"TA#_custom_msgboxHeight = 23 Width = 24 cmessage = ntype = 48 ctitle = (_screen.Caption) builderx = (HOME()+"Wizards\BuilderD,BuilderDForm") Name = "_msgbox" custom!Arial, 0, 9, 5, 15, 12, 21, 3, 0 _login dialogs.hPixels& dialogs.hf0j'E* ..\foxpro.hn1R,..\bitmaps\login_s.bmp8Base login container. Allows entry of name and password.Class7_form_login!Arial, 0, 8, 5, 14, 11, 30, 3, 0  _aboutbox dialogs.hPixels_login.& dialogs.hWX# ..\foxpro.hXx#mmand,lnVFPSProtoccboName+cmessage Message box message text. ntype Message box type. ctitle Message box title text. lbeep Specifies whether a beep occurs when message box is activated. *show Displays the message box and returns the dialog result. *set Sets the properties for message, type, title, and beep. *display  _base.vcx& dialogs.hM( ..\foxpro.hM()MS Sans Serif, 0, 8, 5, 13, 11, 11, 2, 0  _keywords dialogs.hPixelsClass11_dialog _keywords\Height = 0 Left = 8 Top = 147 Width = 388 BorderColor = 255,255,255 Name = "linRule2"  _keywords.linRule2combobox!Arial, 0, 9, 5, 15, 12, 21, 3, 0 _splashPixelsClass2combobox_form_splashFontBold = .T. FontSize = 24 BackStyle = 0 Caption = "Splash Screen" Height = 40 Left = 132 Top = 192 Width = 223 Name = "Label1" _splash.Label1labellabelform 7%StnU CUTHISFORMREFRESHInteractiveChange,121))MS Sans Serif, 0, 8, 5, 13, 11, 11, 2, 0 rotocol) lnVFP_login.EThis class displays an About Application that the user can customize.Class15_formAnduration This is duration in seconds to display splash screen. PROCEDURE Activate THIS.PICTURE = THIS.PICTURE LOCAL t1 t1 = SECONDS() DO WHILE (SECONDS()- m.t1)-nE5P< ZAed)IpPROCEDURE setup IF !USED(THIS.cTable) IF FILE(THIS.cDBFName) USE (THIS.cDBFName) IN 0 AGAIN SHARED ALIAS (THIS.cTable) IF EMPTY(ALIAS()) * Could not open password table MESSAGEBOX(NOOPENTABLE_LOC,MB_ICONEXCLAMATION) RETURN .F. ENDIF ENDIF SELECT (THIS.cTable) ENDIF THIS.cboName.RowSource = "SELECT " + ; THIS.cFieldName + ; " FROM " + THIS.cTable + ; " ORDER BY " + THIS.cFieldName + ; " INTO CURSOR cNames" THIS.cboName.Requery() GO TOP IF _TALLY > 0 THIS.cboName.ListIndex = 1 ELSE MESSAGEBOX(NOUSERS_LOC,MB_ICONEXCLAMATION) RETURN .F. ENDIF ENDPROC PROCEDURE checkpassword *-- Now check the password LOCAL lcField,lcPassField * If not Password specified, allow password thru IF EMPTY(THIS.cPassword) RETURN .T. ENDIF SELECT (THIS.cTable) lcPassField = ALLTRIM(EVAL(THIS.cPassword)) lcField = ALLTRIM(THIS.txtPassword.Value) lcField = THIS.ProcessPassword(lcField) DO CASE CASE THIS.lCaseSensitive AND lcPassField == lcField RETURN .T. CASE UPPER(lcPassField) == UPPER(lcField) RETURN .T. ENDCASE RETURN .F. ENDPROC PROCEDURE processpassword * This is a stub routine if you wish to add some * sort of encryption routine to process the password. LPARAMETER tcPassword RETURN tcPassword ENDPROC PROCEDURE QueryUnload IF !DODEFAULT() RETURN .F. ENDIF THIS.Release() ENDPROC PROCEDURE Refresh *-- Set up our workareas LOCAL lcFieldValue IF EMPTY(this.cTable) RETURN ENDIF SELECT (THIS.cTable) lcFieldValue = UPPER(ALLTRIM(THIS.cboName.DisplayValue)) LOCATE FOR UPPER(ALLTRIM(EVAL(THIS.cFieldName))) == lcFieldValue ENDPROC PROCEDURE Unload IF USED("cNames") USE IN cNames ENDIF IF !EMPTY(this.cTable) AND USED(this.cTable) USE IN (this.cTable) ENDIF ENDPROC PROCEDURE Init *-- (c) Microsoft Corporation 1995 IF EMPTY(this.cFieldName) OR EMPTY(this.cTable) RETURN ENDIF RETURN THIS.Setup() ENDPROC PROCEDURE Release * If user provided a password object, let's set DODEFAULT() IF VARTYPE(THIS.oPassword)="O" THIS.oPassword.AddProperty("lValidPassword",THIS.lValidPassword) ENDIF ENDPROC  %^smU$I:UTHISFORM HELPCONTEXTIDClick,1!2:)EPROCEDURE Click HELP ID (thisform.HelpContextID) NOWAIT ENDPROC Top = 63 Left = 251 Height = 23 Width = 75 FontName = "MS Sans Serif" FontSize = 8 Cancel = .T. Caption = "\) _locateitem.cmdOKIPROCEDURE Click thisform.cFileName=.NULL. thisform.Release ENDPROC Top = 63 Left = 170 Height = 23 Width = 75 FontName = "MS Sans Serif" FontSize = 8 Cancel = .T. Caption = "Cancel" TabIndex = 4 Name = "cmdCancel"  commandbutton commandbuttonFontBold = .F. FontSize = 8 BackStyle = 0 Caption = "Registered Company " Height = 25 Left = 130 Top = 202 Width = 205 TabIndex = 6 Name = "lblUserCorp"  _aboutbox. lblUserCorplabellabel cmdCancel commandbutton commandbuttonTop = 63 Left = 8 Height = 23 Width = 75 FontName = "MS Sans Serif" FontSize = 8 Caption = "\=1,ALLTRIM(this.Value),"") IF this.ListCount<1 OR EMPTY(lcValue) this.ListIndex=-1 ENDIF thisform.cLastValue=lcValue WITH this.parent.parent.txtKeyword .Value=lcValue .Enabled=(NOT EMPTY(lcValue)) ENDWITH ENDPROC "Top = 12 Left = 8 Width = 387 Height = 125 TabIndex = 1 Name = "cntSuperMover" lstLeft.FontName = "MS Sans Serif" lstLeft.FontSize = 8 lstLeft.Height = 109 lstLeft.Left = 0 lstLeft.Top = 15 lstLeft.Width = 168 lstLeft.Name = "lstLeft" cmdAdd.Top = 24 cmdAdd.Left = 182 cmdAdd.FontName = "MS Sans Serif" cmdAdd.FontSize = 8 cmdAdd.Name = "cmdAdd" cmdRemove.Top = 70 cmdRemove.Left = 182 cmdRemove.FontName = "MS Sans Serif" cmdRemove.FontSize = 8 cmdRemove.Name = "cmdRemove" lstRight.FontName = "MS Sans Serif" lstRight.FontSize = 8 lstRight.Height = 109 lstRight.Left = 219 lstRight.Top = 15 lstRight.Width = 168 lstRight.Name = "lstRight" LABEL1.AutoSize = .T. LABEL1.FontName = "MS Sans Serif" LABEL1.FontSize = 8 LABEL1.Caption = "A\0 MESSAGEBOX(M_KEYWORD_LOC+[ "]+lcValue+[" ]+M_ALREADY_EXISTS_LOC+".", ; 16,thisform.Caption) this.parent.txtKeyword.SetFocus RETURN .F. ENDIF WITH this.parent.cntSuperMover lnListIndex=.lstLeft.ListIndex IF llAddMode lnListIndex=ALEN(.aChoices)+1 lnItemID=lnListIndex DIMENSION .aChoices[lnListIndex] .aChoices[lnItemID]=lcValue ELSE lnItemID=.lstLeft.IndexToItemID(lnListIndex) .aChoices[lnItemID]=lcValue ENDIF ASORT(.aChoices) .lstLeft.Refresh lnListIndex=-1 FOR lnCount = 1 TO ALEN(.aChoices) IF LOWER(.aChoices[lnCount])==LOWER(lcValue) lnListIndex=lnCount EXIT ENDIF ENDFOR .lstLeft.ListIndex=lnListIndex .lstLeft.TopIndex=lnListIndex .lstLeft.SetFocus ENDWITH thisform.lAddMode=.F. thisform.lUpdated=.T. this.parent.cmdScratch.Enabled=.F. this.Enabled=.F. WITH this.parent.cntSuperMover.lstLeft .Refresh .SetFocus ENDWITH ENDPROC  T%(M 7UT-T-T-TaTa ~  U THISPARENTCMDENTERENABLEDTHISFORMLADDMODECMDADD CMDREMOVE CNTSUPERMOVERLSTLEFTREFRESHSETFOCUSClick,1AAAaA2)PROCEDURE Click this.parent.cmdEnter.Enabled=.F. this.Enabled=.F. thisform.lAddMode=.F. this.parent.cmdAdd.Enabled=.T. this.parent.cmdRemove.Enabled=.T. WITH this.parent.cntSuperMover.lstLeft .Refresh .SetFocus ENDWITH ENDPROC Top = 157 Left = 180 Height = 23 Width = 22 FontName = "MS Sans Serif" FontSize = 8 Picture = graphics\_cancel.bmp Caption = "" Enabled = .F. TabIndex = 4 ForeColor = 128,0,0 Name = "cmdScratch"  cmdScratch commandbutton commandbutton xx| % / UjTaTcT Ta  U THISFORMLADDMODE CLASTVALUETHISPARENT TXTKEYWORDVALUEENABLEDREFRESHINTERACTIVECHANGESETFOCUSClick,11A2)xPROCEDURE Click thisform.lAddMode=.T. thisform.cLastValue="" WITH this.parent.txtKeyword .Value="" .Enabled=.T. .Refresh .InteractiveChange .SetFocus ENDWITH ENDPROC Top = 157 Left = 8 Height = 23 Width = 75 FontName = "MS Sans Serif" FontSize = 8 Caption = "\=2 ADEL(.aChoices,lnItemID) DIMENSION .aChoices[lnKeywordCount-1] ELSE DIMENSION .aChoices[1] .aChoices="" ENDIF .lstLeft.Refresh .lstLeft.SetFocus ENDWITH ENDPROC Top = 157 Left = 89 Height = 23 Width = 75 FontName = "MS Sans Serif" FontSize = 8 Caption = "\ -(CTCC%CN # > :FG&(TC "%CC  B T(c#TC CC T ULNKEYWORDCOUNTLNCOUNT LCKEYWORD LCKEYWORDS LAKEYWORDSTHISHIDE CNTSUPERMOVERLUPDATEDACHOICES ASELECTIONSKEYWORDSALLKEYWORDRELEASE CKEYWORDS %C C0 :B-Qkeywords%CCnB-  TF T~C' T TCCULNCOUNT LAKEYWORDSTHISCDBFNAMEKEYWORDSKEYWORD CNTSUPERMOVER INITCHOICESJ C%COC"C cKeywordsUTHIS OKEYWORDS ADDPROPERTY CKEYWORDS)%C B- CUTHISRELEASE(%C C !B-UTHIS INITIALIZE BUTHIS CKEYWORDSapply, initialize\Release QueryUnload(InitdUnload11A!aAAQAqQAAQAAAaA1!AAq1AA3qqAqAqQAA3!A3qA2qA3236G9ML[TQZU`)tPROCEDURE getregisteredowner * This is a stub for your routine to obtain registered user name. RETURN thisform.lblUserName.Caption ENDPROC PROCEDURE getregisteredcompany * This is a stub for your routine to obtain registered corporation name. RETURN thisform.lblUserCorp.Caption ENDPROC PROCEDURE Unload SET MESSAGE TO ENDPROC PROCEDURE Init *-- (c) Microsoft Corporation 1995 LPARAMETERS tcAppName, tcVersion, tcCopyright, tcTrademark, tcLogoBMP LOCAL lnError,lcMSINFO *-- Set new property values if parameters do not contain .F. IF TYPE("tcAppName") = "C" thisform.Caption = ABOUT_LOC + ALLTRIM(tcAppName) thisform.lblAppName.Caption = ALLTRIM(tcAppName) ENDIF IF TYPE("tcVersion") = "C" thisform.lblVersion.Caption = VERSIONLABEL_LOC + ALLTRIM(tcVersion) ENDIF IF TYPE("tcCopyright") = "C" thisform.lblCopyright.Caption = ALLTRIM(tcCopyright) ENDIF IF TYPE("tcTrademark") = "C" thisform.lblTrademark.Caption = tcTrademark thisform.lblTrademark.WordWrap = 1 ENDIF IF TYPE("tcLogoBMP") = "C" thisform.imgLogo.Picture = tcLogoBMP ENDIF thisform.lblUserName.Caption = THIS.GetRegisteredOwner() thisform.lblUserCorp.Caption = THIS.GetRegisteredCompany() lcMSINFO = "" lnError = THIS.Registry.GetRegKey("Path",@lcMSINFO,KEY_WIN4_MSINFO,HKEY_LOCAL_MACHINE) IF lnError = 0 thisform.cMSInfoDir=lcMSINFO ENDIF *-- Check if MSINFO.EXE exists, otherwise remove the System Info command button and *-- shorten the form IF EMPTY(thisform.cMSInfoDir) thisform.cMSInfoDir = " " thisform.cmdSysInfo.Enabled = .F. thisform.Height = 282 ENDIF ENDPROC PROCEDURE Activate SET MESSAGE TO thisform.Caption ENDPROC #PROCEDURE apply LOCAL lnKeywordCount,lnCount,lcKeyword,lcKeywords LOCAL ARRAY laKeywords[1] this.Hide WITH this.cntSuperMover IF this.lUpdated SET MESSAGE TO M_UPDATING_KEYWORDS_LOC+" ..." lnKeywordCount=ALEN(.aChoices) DIMENSION laKeywords[lnKeywordCount] laKeywords="" ACOPY(.aChoices,laKeywords) FOR lnCount = 1 TO ALEN(.aSelections,1) lcKeyword=.aSelections[lnCount,1] IF EMPTY(lcKeyword) LOOP ENDIF lnKeywordCount=lnKeywordCount+1 DIMENSION laKeywords[lnKeywordCount] laKeywords[lnKeywordCount]=ALLTRIM(lcKeyword) ENDFOR ASORT(laKeywords) SELECT keywords REPLACE ALL Keyword WITH "" DELETE ALL LOCATE FOR lnCount = 1 TO ALEN(laKeywords) lcKeyword=ALLTRIM(laKeywords[lnCount]) IF lnCount>RECCOUNT() APPEND BLANK ELSE GO lnCount ENDIF REPLACE Keyword WITH lcKeyword RECALL ENDFOR SELECT 0 SET MESSAGE TO ENDIF lnKeywordCount=ALEN(.aSelections,1) IF lnKeywordCount=0 OR EMPTY(.aSelections[1,1]) this.Release RETURN ENDIF lcKeywords="" FOR lnCount = 1 TO lnKeywordCount lcKeywords=ALLTRIM(lcKeywords+" "+ALLTRIM(.aSelections[lnCount,1])) ENDFOR ENDWITH this.cKeywords=lcKeywords this.Release ENDPROC PROCEDURE initialize LOCAL lnCount LOCAL laKeywords[1] IF EMPTY(THIS.cDBFName) OR !FILE(THIS.cDBFName) RETURN .F. ENDIF USE (THIS.cDBFName) AGAIN SHARED ALIAS "keywords" IF EMPTY(ALIAS()) RETURN .F. ENDIF DIMENSION laKeywords[1] laKeywords="" SELECT keywords lnCount=0 SCAN ALL FOR NOT DELETED() lnCount=lnCount+1 DIMENSION laKeywords[lnCount] laKeywords[lnCount]=ALLTRIM(Keyword) ENDSCAN this.cntSuperMover.InitChoices(@laKeywords) ENDPROC PROCEDURE Release DODEFAULT() IF VARTYPE(THIS.oKeywords)="O" THIS.oKeywords.AddProperty("cKeywords",THIS.cKeywords) ENDIF ENDPROC PROCEDURE QueryUnload IF !DODEFAULT() RETURN .F. ENDIF THIS.Release() ENDPROC PROCEDURE Init IF !DODEFAULT() OR !THIS.Initialize() RETURN .F. ENDIF ENDPROC PROCEDURE Unload RETURN this.cKeywords ENDPROC  e4%P"U%C MS Sans Serif$ !C MS Sans Serif$ !C MS Sans Serif$ !C MS Sans Serif$  Ta CFontNameArialBUTHIS LLARGEFONTSETALLt&G&(Ut&G&(UT-T-UTHISENABLEDVISIBLE UTHIS QUERYUNLOAD- %& UNKEYCODE NSHIFTALTCTRLTHISRELEASEHG2GAG GG G$(G_ G.R UTHISSETFONTsetfont, DeactivateActivate+ QueryUnload=ReleasexKeyPressInit1d AA3Qa3Qa333A3aaaaaaaQ2 .O n $q4')PROCEDURE QueryUnload IF !DODEFAULT() RETURN .F. ENDIF THIS.RELEASE() ENDPROC PROCEDURE Release DODEFAULT() IF VARTYPE(THIS.oLocateItem)="O" THIS.oLocateItem.AddProperty("cFileName",THIS.cFileName) ENDIF ENDPROC PROCEDURE Unload RETURN thisform.cFileName ENDPROC PROCEDURE Init #DEFINE ERR_OPENINGFILE_LOC [Error opening "] #DEFINE ERR_FILENOTFOUND_LOC [". File not found.] LPARAMETERS oSource,tcFileName,tlGetPicture IF VARTYPE(oSource)="O" this.oLocateItem = oSource ENDIF IF VARTYPE(tcFileName)#"C" OR EMPTY(tcFileName) RETURN .F. ENDIF this.cDefaultFileName=LOWER(ALLTRIM(tcFileName)) this.lGetPicture=tlGetPicture this.edtMessage.Value=ERR_OPENINGFILE_LOC + this.cDefaultFileName + ERR_FILENOTFOUND_LOC RETURN DODEFAULT() ENDPROC